#ifndef PLAYER_H
#define PLAYER_H

#include "entity.h"

class Player : public Entity {
public:
	Player(RenderData render_data);

	void update(State& state, bool pressed_keys[], int& camera_x, int& camera_y) override;
	void render(SDL_Renderer *renderer) override;
	void undo(State& state, bool pressed_keys[], int& camera_x, int& camera_y);
private:
	enum Selector {
		IDLE_RIGHT = 0, IDLE_LEFT, RUNNING_RIGHT, RUNNING_LEFT, SELECTOR_ENUM_SIZE
	};

	Selector sel = IDLE_RIGHT;
	int moved_x = 0;
	int moved_y = 0;

	void move(int x, int y, int& camera_x, int& camera_y, int window_w, int window_h);
};

#endif